package com.xbs.service.hitchhiking;

import java.util.List;
import com.xbs.dao.hitchhiking.HitchOrderAdminDao;
import com.xbs.entity.CommonOrderEntity;
import com.xbs.entity.HitchMoneyAdminEntity;
import com.xbs.entity.HitchOrderAdminEntity;
import com.xbs.entity.TimeEntity;

/**
 * 后台订单管理
 * 
 * @author dell
 */
public class HitchOrderAdminService {

	private HitchOrderAdminDao hitchdao;

	public HitchOrderAdminService() {
		hitchdao = new HitchOrderAdminDao();
	}

	/**
	 * 1.查询所有顺风车订单
	 */
	public List<HitchOrderAdminEntity> getAdminOrder() {
		return hitchdao.getHitchOrder();
	}

	/**
	 * 2.根据身份证号码，姓名，订单号，电话
	 */
	public List<HitchOrderAdminEntity> getHitchOrderByFour(String str) {
	
		return hitchdao.getHitchOrderByFour(str);
	}
	
	/**
	 * 3.根据订单编号进行取车弹框查询
	 */
	public List<CommonOrderEntity> selOrderByGet(CommonOrderEntity corder) {
		
		return hitchdao.selOrderByGet(corder);
	}
	
	/**
	 * 4.取车时，根据订单编号进行订单表修改
	 */
	public int updateOrderByGet(CommonOrderEntity corder){
		return hitchdao.updateOrderByGet(corder);
	}
	
	/**
	 * 5.取车时，对时间表进行修改
	 */
	public int updateGetTime(TimeEntity te){
		return hitchdao.updateGetTime(te);
	}
	
	/**
	 * 6.根据订单编号进行还车弹框查询
	 */
	public List<CommonOrderEntity> selOrderByReturn(CommonOrderEntity hoae){
		
		return hitchdao.selOrderByReturn(hoae);
	}
	
	/**
	 *7. 还车时更改金钱表和订单表数据
	 */
	public int updateOrderByReturn(HitchMoneyAdminEntity hmae){
		return hitchdao.updateOrderByReturn(hmae);
	}
	
	/**
	 * 8.取车时，对时间表进行修改
	 */
	public int updateReturnTime(TimeEntity te){
		return hitchdao.updateReturnTime(te);
	}
	
	

	
}
